package com.lb.activity.service.impl;

import com.lb.activity.mapper.RolePermissionMapper;
import com.lb.activity.service.RolePermissionService;
import com.lb.activity.vo.RolePermission;
import com.lb.activity.vo.RolePermissionExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 001030
 */
@Service
public class RolePermissionServiceImpl implements RolePermissionService {

    @Resource
    private RolePermissionMapper rolePermissionMapper;

    @Override
    public List<RolePermission> getRolePermissions(Long roleid) {
        RolePermissionExample example = new RolePermissionExample();
        RolePermissionExample.Criteria criteria = example.createCriteria();
        criteria.andRoleidEqualTo(roleid);
        List<RolePermission> storeRolePermissions = rolePermissionMapper.selectByExample(example);
        return storeRolePermissions;
    }
}
